package Hxw3DEngine.core.materials.shader.filters {
	
	import Hxw3DEngine.core.materials.shader.ShaderProgram;
	import Hxw3DEngine.core.materials.shader.utils.ShaderRegisterCache;
	import Hxw3DEngine.core.Resource.texture.ResourceTexture;
	import flash.display3D.Context3DTextureFormat;
	/**
	 * filter 
	 * @author Neil
	 * 
	 */	
	public class Filter3D extends ShaderProgram {
		
		public var name 	: String;
		/** 权重，决定filter的组织顺序，权重越大，越靠前组装 */
		public var priority : int = 0;
		
		public function Filter3D(name : String = "Filter3D") {
			this.name = name;
		}
		
		public function update() : void {
			
		}
		
		/**
		 * 纹理描述 
		 * @param texture
		 */		
		public function description(texture : ResourceTexture) : String {
			var format:String = "";
			if (texture.format == Context3DTextureFormat.COMPRESSED) {
				format = ",dxt1";	
			}else if (texture.format == Context3DTextureFormat.COMPRESSED_ALPHA) {
				format = ",dxt5";
			}
			return ' <' + texture.typeMode + ', ' + texture.magMode + ', ' + texture.mipMode + ', ' + texture.wrapMode + format + '> \n';
		}
		
	}
}
